package pack0909;

// 类型转换---强制类型转换
public class DemoJ {
    public static void main(String[] args) {
        // 强行的把一个double-->int
        double a = 977.88;
        // 强制(需要转换的类型) 会有精度的缺失
        int b = (int)a;
        System.out.println(a);
        System.out.println(b);
        System.out.println("------------------------------");
        // ❌
        long c = 99999L;
        short d = (short) c;
        System.out.println(c);
        System.out.println(d);
    }
}